import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;


public class DateTest {

	public static void main(String[] args) {
		
		test1();
	}
	
	private static void test1() {
		Date now = new Date();
		printDate(now);
		
		Timestamp ts = new Timestamp(now.getTime());
		printDate(ts);
		
		SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
		System.out.println("Now is " + sdf.format(new Date()));
		
	}
	
	private static void printDate(Date date) {
		System.out.println("date: " + date);
	}
}
